package main

import "fmt"

type vector[T any] []T

func printslice[T any](s []T) {
	for _, v := range s {
		fmt.Printf("%v,", v)
	}
	fmt.Println("\n")
}

//泛型切片
func main() {
	v := vector[int]{58, 1881}
	printslice(v)
	v2 := vector[string]{"烤鸡", "烤鸭", "烤鱼", "烤面筋"}
	printslice(v2)
}
